Return to doc.sitecore.com

Searching with Dates

To locate records matching specific date criteria, convert dates to numbers before comparison.  To do this, remove the “T” character by translating it to an empty string. 

The following code processes selects all descendants of the current record which have been updated more recently than the current item:

sc:descendants( $sc_currentitem )/self::item

[translate(@updated,'T','') > translate( $sc_currentitem/@updated,'T','')]